package com.ruoyi.vehicle.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.vehicle.mapper.TbHawkMapper;
import com.ruoyi.vehicle.domain.TbHawk;
import com.ruoyi.vehicle.service.ITbHawkService;

/**
 * 强行派单设置Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-18
 */
@Service
public class TbHawkServiceImpl implements ITbHawkService 
{
    @Autowired
    private TbHawkMapper tbHawkMapper;

    /**
     * 查询强行派单设置
     * 
     * @param hawkId 强行派单设置主键
     * @return 强行派单设置
     */
    @Override
    public TbHawk selectTbHawkByHawkId(Long hawkId)
    {
        return tbHawkMapper.selectTbHawkByHawkId(hawkId);
    }

    /**
     * 查询强行派单设置列表
     * 
     * @param tbHawk 强行派单设置
     * @return 强行派单设置
     */
    @Override
    public List<TbHawk> selectTbHawkList(TbHawk tbHawk)
    {
        return tbHawkMapper.selectTbHawkList(tbHawk);
    }

    /**
     * 新增强行派单设置
     * 
     * @param tbHawk 强行派单设置
     * @return 结果
     */
    @Override
    public int insertTbHawk(TbHawk tbHawk)
    {
        tbHawk.setCreateTime(DateUtils.getNowDate());
        return tbHawkMapper.insertTbHawk(tbHawk);
    }

    /**
     * 修改强行派单设置
     * 
     * @param tbHawk 强行派单设置
     * @return 结果
     */
    @Override
    public int updateTbHawk(TbHawk tbHawk)
    {
        return tbHawkMapper.updateTbHawk(tbHawk);
    }

    /**
     * 批量删除强行派单设置
     * 
     * @param hawkIds 需要删除的强行派单设置主键
     * @return 结果
     */
    @Override
    public int deleteTbHawkByHawkIds(Long[] hawkIds)
    {
        return tbHawkMapper.deleteTbHawkByHawkIds(hawkIds);
    }

    /**
     * 删除强行派单设置信息
     * 
     * @param hawkId 强行派单设置主键
     * @return 结果
     */
    @Override
    public int deleteTbHawkByHawkId(Long hawkId)
    {
        return tbHawkMapper.deleteTbHawkByHawkId(hawkId);
    }
}
